package storeMovie.Util;

import org.hibernate.Session;

import storeMovie.JavaBean.Category;

public class CategoryManager {
	// private Session session = null;

	public CategoryManager() {
		// session = SessionFactoryUtil.getSessionFactory().getCurrentSession();
		// session.beginTransaction();
	}

	public Category getCategory(int categoryId) {
		Session session = null;
		Category category = null;
		try {
			category = (Category) session.get(Category.class, new Integer(
					categoryId));
			return category;
		} catch (Exception e) {
			System.out.println(e.getCause());
		}
		return category;
	}
}
